#ifndef ObjGridView_First
#define ObjGridView_First
#ifdef __GNUG__
#pragma interface
#endif

#include "GridView.h"

class SeqCollection;

//---- ObjGridView -------------------------------------------------------------

class ObjGridView : public GridView {
public:
	MetaDef(ObjGridView);
	ObjGridView(int id, EvtHandler *eh, int minwidth, SeqCollection *c= 0);
	~ObjGridView();

	void SetCollection(SeqCollection *c, bool freethis= TRUE);
	Point GetColsRows();
	int GetGap(Direction, int);
	Command *DoKeyCommand(int ch, Token);
	Object *ObjAt(const Point &cell);
	Object *SetObjAt(Object *op, const Point &cell);
	static int RowHeight();
protected:
	void DrawCell(const Point &cell, const Rectangle&, const Rectangle&, bool);
	virtual void DrawObjCell(const Point &cell, Object*, const Rectangle&,
														const Rectangle&, bool);
	Ink *GetInk(const Point &cell);
	Metric CellSize(const Point &cell);
	virtual Metric ObjCellSize(const Point &cell, Object *op);
protected:
	SeqCollection *coll;
	bool freethis;
	int cols, width;
};

#endif

